package com.mc.string;

import java.util.Scanner;

public class LastLength {
    
    public static void main(String[] args){
        
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String str = sc.nextLine();
            int index =str.lastIndexOf(' ');
        	str = str.substring(index+1);
            System.out.println(str.length());
        }
        
    }
}
